1. Field of the Invention
The present invention relates to an image processing apparatus and method having a function of handling multivalued image data as structured coded data.
2. Description of the Related Art
In the past, there has been a technique of encoding an image in which characters and photographs coexist. Herein, an image is cut into rectangular areas of different natures, and then an encoding mode is determined for each area according to the nature of the area: for example, a binary encoding mode including an MMR mode is determined for a character area; and a so-called JPEG adaptable discrete cosine transform (ADCT) encoding mode is determined for a photography area.
However, as long as the above conventional technique is concerned, if an area in which characters are superposed on a photograph is handled, the area is encoded as a natural-colored area. This results in degraded character quality or deteriorated encoding efficiency.
In general, areas are cut out in the form of rectangles. When it comes to an area in which characters or photographs are congested, areas cannot be cut out successfully. For example, a character may be present as part of an area cut out as a natural-colored image. Thus, efficient encoding is disabled from time to time.
According to known art, characters or drawings in image data are converted into binary data and then encoded. After the coded data is decoded, multivalued information (having, for example, 256 gray-scale levels ranging from 0 to 255) is provided. In this case, a value of a pixel represented by a binary digit 0 is defined as 255 and a value of a pixel represented by a binary digit 1 is defined as 0. Thus, pixel values are provided as multivalued information by means of a display, output equipment such as a printer, or the like.
However, the above technique poses a problem in that since binary-coded characters and drawings are defined with 0s or 255s, if they are output as multivalued information, areas containing them appear unnatural. Consequently, unclear characters or color characters are rendered as black characters or specific-color characters.
In recent years, color images in which characters or a logo is laid out on a background having a uniform color (for example, green) different from the color (for example, red) of the characters or logo, have been widely adopted. Such a bicolor area of an image which consists of two colors (a base color plus another color) has been treated as a multivalued color image in the past. This poses a problem in that the amount of the image data is enormous or that encoding or decoding brings about degradation of image quality.